//
//  checkTableViewController.m
//  11210
//
//  Created by student on 16/3/4.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "checkTableViewController.h"

@interface checkTableViewController ()
@property (nonatomic,strong) NSArray *list;
//@property (nonatomic,strong) NSMutableArray *selectedindexPath;
@property (nonatomic,strong) NSIndexPath *lastIndexPath;

@end

@implementation checkTableViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.list = @[@"Who Hash",
                  @"Bubba Gump Shrimp Étouffée", @"Who Pudding", @"Scooby Snacks",
                  @"Everlasting Gobstopper", @"Green Eggs and Ham", @"Soylent Green",
                  @"Hard Tack", @"Lembas Bread", @"Roast Beast", @"Blancmange",@"Who Hash",
                  @"Bubba Gump Shrimp Étouffée", @"Who Pudding", @"Scooby Snacks",
                  @"Everlasting Gobstopper", @"Green Eggs and Ham", @"Soylent Green",
                  @"Hard Tack", @"Lembas Bread", @"Roast Beast", @"Blancmange"];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.list.count;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
    cell.textLabel.text = self.list[indexPath.row];
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *lastcell = [tableView cellForRowAtIndexPath:self.lastIndexPath ];
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];

    self.lastIndexPath = indexPath;
}
@end
